<template>
  <div class="co">
    
        <ul v-for="(item,index) in data" :key="index"  @click="jump(item.noticeId)">
            <li >{{item.title}}</li>
            <li>{{item.createTime}}</li>
            <li v-text="item.message">{{item.createTime}}</li>
        </ul>
  
  </div>
</template>

<script>
export default {
  name: 'jsv',
  data () {
    return {
       data:{},
      
     }
  },
  methods:{
     jump(noticeId){
      this.$router.push({
        name:'HelloWorld',
        query:{noticeId:noticeId}
        })
     
    }
  },
  mounted() {
   this.axios({ 
     method:'get',
     url:'https://test.yintu168.com:8866/notice/public/list.do',
   })
       .then(response=>{
         console.log(response);
         if(response.data.success==1){
           this.data=response.data.data;
         }else{
           alert("请求失败")
         }
         
       })
    }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
  font-weight: normal;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 ;
}
a {
  color: #42b983;
}
.co{
  width: 100%;
  height: 100%;
}

ul{
    width: 80%;
    height: 20%;
    border: 1px solid red;
    margin-left: 10%;
}
ul li{
    width: 100%;
    height: 30%;
    margin-top: 2px;
   
}
</style>
